﻿/*
Copyright (C) 2010 INOUE Hiroyuki

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

using System;

namespace CodePlex.Dombly.DiskUsage.BusinessLogic
{
    /// <summary>
    /// Defines the required properties for a FileSystem object.
    /// </summary>
    public interface IFileSystem
    {
        /// <summary>
        /// Gets the unique identifier of the instance.
        /// </summary>
        Guid Id { get; }
        /// <summary>
        /// For files, gets the name of the file.  For directories, gets 
        /// the name of the last directory in the hierarchy if a hierarchy 
        /// exists.  
        /// Otherwise, the Name property gets the name of the directory.
        /// </summary>
        string Name { get; }
        /// <summary>
        /// Gets the full path of the directory or file.
        /// </summary>
        string FullName { get; }
        /// <summary>
        /// Gets the unique identifier of the parent directory.
        /// </summary>
        Guid? ParentId { get; }
        /// <summary>
        /// For files, gets zero.  
        /// For directories, gets the the count of directories beneath the 
        /// directory, including itself and all the subdirectories.
        /// </summary>
        int DirectoryCount { get; }
        /// <summary>
        /// For files, gets one.  
        /// For directories, gets the count of files beneath the directory 
        /// and all the subdirectories.
        /// </summary>
        int FileCount { get; }
        /// <summary>
        /// For files, gets its size in bytes.
        /// For directories, gets the summation of file sizes of
        /// all the files beneath the directory and all the subdirectories,
        /// in bytes.
        /// </summary>
        long FileSize { get; }
        /// <summary>
        /// Gets the creation time of the current file or directory.
        /// </summary>
        DateTime? Created { get; }
        /// <summary>
        /// Gets the time when the current file or directory was last 
        /// written to.
        /// </summary>
        DateTime? Updated { get; }
        /// <summary>
        /// Gets the owner of the file or directory.
        /// </summary>
        string Owner { get; }
        /// <summary>
        /// Gets the unique identifier of the snapshot.
        /// </summary>
        Guid SnapShotId { get; }
        /// <summary>
        /// Gets the time when the snapshot of the file or directory was 
        /// taken.
        /// </summary>
        DateTime? Scanned { get; }
    }
}
